<?php

/**
* iZAP izap_videos
*
* @package youtube, vimeo, veoh and onserver uploading
* @license GNU Public License version 3
* @author iZAP Team "<support@izap.in>"
* @link http://www.izap.in/
* @version 1.5-2.0
*/

	 
	$item  = $vars['item'];
	
	$performed_by = get_entity($item->subject_guid); // $statement->getSubject();
	$object = get_entity($item->object_guid);
	$url = $object->getURL();
	$videoTitle .= '<a href="' . $url . '">' . $object->title . '</a>';
	//$video_src = $vars['entity']->videosrc;
	$video_src = $vars['url'] . "pg/izap_videos/izap/video/" . $object->guid . '/' . $object->title . '.flv';
	
	$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
	
	
	$string .= sprintf(elgg_echo('izap_videos:river:titled'),$url,$videoTitle);
	
	$video = "
	<div style='background-color:#000000; width:375px; height:226px'> 
	<object width='375' height='226' id='flvPlayer'><param name='allowFullScreen' value='true'><param name='wmode' value='opaque'><param name='movie' value='{$vars['url']}mod/izap_videos/player/izap_player.swf?movie={$video_src}&bgcolor=000000&fgcolor=000000&playercolor=000000&volume=70&autoload=on&mute=off&autorewind=on&muteonly=off'>
	<embed src='{$vars['url']}mod/izap_videos/player/izap_player.swf?movie={$video_src}&bgcolor=000000&fgcolor=000000&playercolor=000000&volume=70&autoload=on&mute=off&autorewind=on&muteonly=off' width='375' height='226' allowFullScreen='true' wmode='opaque' type='application/x-shockwave-flash'></object>
	</div>
	";

	//echo $string;
	echo elgg_view('river/item/extra',
					array('performed_by' => $performed_by,
						'object' => $object,
						'body' => $string.' <br /> '.$video.'<br />',
						'show_comment' => TRUE,
						'add_video' => TRUE,)
					);
?>